﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EDMS.SMS
{
    public partial class Xmxx : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack && !IsCallback)
            {
                if (Request.QueryString["Phone"] != null)
                {
                    string phone = Request.QueryString["Phone"];
                    
                    using (DAL.DataClassesDataContext dc = new DAL.DataClassesDataContext())
                    {
                        DAL.Xm xm = dc.Xm.FirstOrDefault(x => x.sjhm == phone);
                        if (xm != null)
                        {
                            lab_sfzh.Text = xm.sfzh;
                            lab_xm.Text = xm.xmxm;
                            lab_xb.Text = xm.xb.Equals("M") ? "男" : "女";
                            lab_cym.Text = xm.cym;
                            lab_sr.Text = xm.sr;
                            lab_sjhm.Text = xm.sjhm;
                            lab_zz.Text = xm.zz;
                            lab_xjbh.Text = xm.xjbh;
                            lab_sfwt.Text = xm.flag.Equals("Y") ? "已委托" : "未委托";
                            lab_sywtcs.Text = xm.sybwtcs.ToString();
                            lab_sftz.Text = xm.send.Equals("Y") ? "已通知" : "未通知";
                            lab_sfhf.Text = xm.reply.Equals("Y") ? "已回复" : "未回复";
                        }
                    }
                }
            }
        }
    }
}